# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xinput_calibrator
pkgver=0.7.5
pkgrel=2
pkgdesc="A generic touchscreen calibration program for X.Org"
url="https://www.freedesktop.org/wiki/Software/xinput_calibrator"
arch="all"
license="MIT"
makedepends="autoconf automake libtool libxtst-dev libxrandr-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver-2.tar.gz::https://github.com/tias/xinput_calibrator/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	autoreconf -fvi
}

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--with-gui=x11
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
71bd27d5bdde02bdf41793a72743127ee930235db40e642e2584549e224cd9d2b36ad22e1b6a764ed431ab9590bf76c57e0075bc7b81b325caffb439dc755930  xinput_calibrator-0.7.5-2.tar.gz
"
